using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Domain.Entities.Auditing;

namespace ERP.Team.WarehouseManagement
{
    /// <summary>
    /// 供应商退货实体
    /// </summary>
    public class SupplierReturns : AuditedAggregateRoot<int>
    {
        /// <summary>
        /// 退货单编号
        /// </summary>
        [Required]
        [StringLength(30)]
        public string ReturnCode { get; set; }

        /// <summary>
        /// 退货单名称
        /// </summary>
        [Required]
        [StringLength(30)]
        public string ReturnName { get; set; }

        /// <summary>
        /// 采购订单编号
        /// </summary>
        [Required]
        [StringLength(30)]
        public string ProcurementCode { get; set; }

        /// <summary>
        /// 供应商
        /// </summary>
        [Required]
        [StringLength(30)]
        public string Vendor { get; set; }

        /// <summary>
        /// 批次号
        /// </summary>
        [Required]
        [StringLength(30)]
        public string LotNumber { get; set; }

        /// <summary>
        /// 退货日期
        /// </summary>
        [Required]
        public DateTime ReturnDate { get; set; }

        /// <summary>
        /// 单据状态
        /// </summary>
        [Required]
        public int DocumentStatus { get; set; }
        /// <summary>
        /// 物料编码
        /// </summary>
        public string MaterielCode { get; set; }

        /// <summary>
        /// 并发标记
        /// </summary>
        public string ConcurrencyStamp { get; set; }

        protected SupplierReturns() { }

        public SupplierReturns(
            string returnCode,  
            string returnName,
            string procurementCode,
            string vendor,
            string lotNumber,
            DateTime returnDate,
            int documentStatus)
        {
            ReturnCode = returnCode;
            ReturnName = returnName;
            ProcurementCode = procurementCode;
            Vendor = vendor;
            LotNumber = lotNumber;
            ReturnDate = returnDate;
            DocumentStatus = documentStatus;
        }
    }
} 